<!DOCTYPE HTML>
<html lang="zh-tw" >
    <!-- Start book django项目 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>配置 | django项目</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-emphasize/plugin.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
    

        
    
    
    <link rel="next" href="../redis/fu-wu-duan-he-ke-hu-duan-ming-ling.html" />
    
    
    <link rel="prev" href="../redis/an-zhuang.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="1.2"
        data-chapter-title="配置"
        data-filepath="redis/pei-zhi.md"
        data-basepath=".."
        data-revision="Mon Aug 10 2020 10:48:54 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        课程介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="redis.html">
            
                
                    <a href="../redis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        Redis
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="redis/an-zhuang.html">
            
                
                    <a href="../redis/an-zhuang.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        安装
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="redis/pei-zhi.html">
            
                
                    <a href="../redis/pei-zhi.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="redis/fu-wu-duan-he-ke-hu-duan-ming-ling.html">
            
                
                    <a href="../redis/fu-wu-duan-he-ke-hu-duan-ming-ling.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        服务端和客户端命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="redis/shu-ju-cao-zuo.html">
            
                
                    <a href="../redis/shu-ju-cao-zuo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        数据操作
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="redis/shu-ju-cao-zuo/string.html">
            
                
                    <a href="../redis/shu-ju-cao-zuo/string.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.1.</b>
                        
                        string
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="redis/shu-ju-cao-zuo/jian-ming-ling.html">
            
                
                    <a href="../redis/shu-ju-cao-zuo/jian-ming-ling.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.2.</b>
                        
                        键命令
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="redis/shu-ju-cao-zuo/hash.html">
            
                
                    <a href="../redis/shu-ju-cao-zuo/hash.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.3.</b>
                        
                        hash
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="redis/shu-ju-cao-zuo/list.html">
            
                
                    <a href="../redis/shu-ju-cao-zuo/list.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.4.</b>
                        
                        list
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="redis/shu-ju-cao-zuo/set.html">
            
                
                    <a href="../redis/shu-ju-cao-zuo/set.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.5.</b>
                        
                        set
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="redis/shu-ju-cao-zuo/zset.html">
            
                
                    <a href="../redis/shu-ju-cao-zuo/zset.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.6.</b>
                        
                        zset
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="redis/yu-python-jiao-hu.html">
            
                
                    <a href="../redis/yu-python-jiao-hu.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        与Python交互
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="redis/yu-python-jiao-hu/strictredis.html">
            
                
                    <a href="../redis/yu-python-jiao-hu/strictredis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.1.</b>
                        
                        Redis
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="redis/yu-python-jiao-hu/string.html">
            
                
                    <a href="../redis/yu-python-jiao-hu/string.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.2.</b>
                        
                        String操作
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    本書使用 GitBook 釋出
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >django项目</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x5B66;&#x4E60;&#x76EE;&#x6807;">&#x5B66;&#x4E60;&#x76EE;&#x6807; </h1>
<ul>
<li>&#x80FD;&#x591F;&#x6839;&#x636E;&#x53C2;&#x8003;&#x8D44;&#x6599;&#x4FEE;&#x6539;&#x5E38;&#x7528;Redis&#x914D;&#x7F6E;</li>
</ul>
<h1 id="&#x914D;&#x7F6E;">&#x914D;&#x7F6E; </h1>
<ul>
<li><p>Redis&#x7684;&#x914D;&#x7F6E;&#x4FE1;&#x606F;&#x5728;<code>/etc/redis/redis.conf</code>&#x4E0B;&#x3002;</p>
</li>
<li><p>&#x67E5;&#x770B;</p>
<blockquote>
<p>sudo vi /etc/redis/redis.conf</p>
</blockquote>
</li>
</ul>
<h1 id="&#x6838;&#x5FC3;&#x914D;&#x7F6E;&#x9009;&#x9879;">&#x6838;&#x5FC3;&#x914D;&#x7F6E;&#x9009;&#x9879; </h1>
<ul>
<li>&#x7ED1;&#x5B9A;ip&#xFF1A;&#x5982;&#x679C;&#x9700;&#x8981;&#x8FDC;&#x7A0B;&#x8BBF;&#x95EE;&#xFF0C;&#x53EF;&#x5C06;&#x6B64;&#x2F8F;&#x6CE8;&#x91CA;&#xFF0C;&#x6216;&#x7ED1;&#x5B9A;&#x2F00;&#x4E2A;&#x771F;&#x5B9E;ip<blockquote>
<p>bind 127.0.0.1</p>
</blockquote>
</li>
<li>&#x7AEF;&#x2F1D;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;6379<blockquote>
<p>port 6379</p>
</blockquote>
</li>
<li><p>&#x662F;&#x5426;&#x4EE5;&#x5B88;&#x62A4;&#x8FDB;&#x7A0B;&#x8FD0;&#x2F8F;</p>
<ul>
<li>&#x5982;&#x679C;&#x4EE5;&#x5B88;&#x62A4;&#x8FDB;&#x7A0B;&#x8FD0;&#x2F8F;&#xFF0C;&#x5219;&#x4E0D;&#x4F1A;&#x5728;&#x547D;&#x4EE4;&#x2F8F;&#x963B;&#x585E;&#xFF0C;&#x7C7B;&#x4F3C;&#x4E8E;&#x670D;&#x52A1;</li>
<li>&#x5982;&#x679C;&#x4EE5;&#x2FAE;&#x5B88;&#x62A4;&#x8FDB;&#x7A0B;&#x8FD0;&#x2F8F;&#xFF0C;&#x5219;&#x5F53;&#x524D;&#x7EC8;&#x7AEF;&#x88AB;&#x963B;&#x585E;</li>
<li>&#x8BBE;&#x7F6E;&#x4E3A;yes&#x8868;&#x793A;&#x5B88;&#x62A4;&#x8FDB;&#x7A0B;&#xFF0C;&#x8BBE;&#x7F6E;&#x4E3A;no&#x8868;&#x793A;&#x2FAE;&#x5B88;&#x62A4;&#x8FDB;&#x7A0B;</li>
<li>&#x63A8;&#x8350;&#x8BBE;&#x7F6E;&#x4E3A;yes</li>
</ul>
<blockquote>
<p>daemonize yes</p>
</blockquote>
</li>
<li><p>&#x6570;&#x636E;&#x2F42;&#x4EF6;</p>
<blockquote>
<p>dbfilename dump.rdb</p>
</blockquote>
</li>
<li>&#x6570;&#x636E;&#x2F42;&#x4EF6;&#x5B58;&#x50A8;&#x8DEF;&#x5F84;<blockquote>
<p>dir /var/lib/redis</p>
</blockquote>
</li>
<li>&#x2F47;&#x5FD7;&#x2F42;&#x4EF6;<blockquote>
<p>logfile &quot;/var/log/redis/redis-server.log&quot;</p>
</blockquote>
</li>
<li>&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x9ED8;&#x8BA4;&#x6709;16&#x4E2A;<blockquote>
<p>database 16</p>
</blockquote>
</li>
<li>&#x4E3B;&#x4ECE;&#x590D;&#x5236;&#xFF0C;&#x7C7B;&#x4F3C;&#x4E8E;&#x53CC;&#x673A;&#x5907;&#x4EFD;&#x3002;<blockquote>
<p>slaveof</p>
</blockquote>
</li>
</ul>
<h1 id="&#x53C2;&#x8003;&#x8D44;&#x6599;">&#x53C2;&#x8003;&#x8D44;&#x6599; </h1>
<p>redis&#x914D;&#x7F6E;&#x4FE1;&#x606F;<a href="http://blog.csdn.net/ljphilp/article/details/52934933" target="_blank">http://blog.csdn.net/ljphilp/article/details/52934933</a></p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../redis/an-zhuang.html" class="navigation navigation-prev " aria-label="Previous page: 安装"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../redis/fu-wu-duan-he-ke-hu-duan-ming-ling.html" class="navigation navigation-next " aria-label="Next page: 服务端和客户端命令"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"fontsettings":{"family":"sans","size":2,"theme":"white"},"toggle-chapters":{},"splitter":{},"emphasize":{},"highlight":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book django项目 -->
</html>
